package sparkExamples

import org.apache.spark.{SparkConf, SparkContext}

object FindURL {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setMaster("local").setAppName("FindURL")
    val sc = new SparkContext(conf)

    val txt = sc.textFile("src\\main\\scala\\apache.log")
    val result = txt.map(
      line => {
        val strings = line.split(" ")
        strings(6)
      }
    )
    result.collect().foreach(println)

    sc.stop()

  }

}
